package com.cloudm.technician.ui.modules.cloudm_box.device_detail

import com.cloudm.technician.data.model.DeviceInfo
import com.cloudm.technician.ui.base.BasePresenter
import com.cloudm.technician.ui.base.BaseView

/**
 * 作者: wesley
 * 时间: 2017/12/19
 * 描述: 设备详情协议接口
 */
interface DeviceDetailContract {

    interface View : BaseView {

        fun onAddMachineTitleReceive()

        fun onBasicMsgTitleReceive()

        fun openMachineBrandActivity()

        fun openMachineModelActivity()

        fun showMachineTypeMsg()

        fun showMachineBrandMsg()

        fun getLicense(): String?

        fun getDeviceName(): String?

        fun getRackId(): String?

        fun getWorkTime(): String?

        fun getFactoryTime(): String?

        fun showLicenseEmpMsg()

        fun showDeviceNameEmpMsg()

        fun showDeviceNameContainsBlankMsg()

        fun showMachineModelMsg()

        fun showRackEmpMsg()

        fun showRackFormatErrMsg()

        fun showWorkTimeMsg()

        fun showFactoryTimeMsg()

        fun showAddDeviceDialog()

        fun showEditDeviceDialog()

        fun hideDeviceDialog()

        fun showErrorMsg(msg: String)

        fun addDeviceSuccess(info: DeviceInfo?)

        fun editDeviceSuccess(info: DeviceInfo)

        fun initUi()

        fun showScanResultEmpMsg()

        fun showLicenseFormatMsg()

        fun showRightLicense(license: String)

        fun showDeviceEmpMsg()
    }

    interface Presenter : BasePresenter {

        fun buildTitle(flag: Int)

        fun openMachineBrandActivity(typeId: Int)

        fun openMachineModelActivity(typeId: Int, brandId: Int)

        fun addOrModifyDevice(flag: Int, typeId: Int, brandId: Int, modelId: Int, id: Int,
                              info: DeviceInfo? = null)

        fun addDevice(map: HashMap<String, String>)

        fun editDevice(map: HashMap<String, String>, info: DeviceInfo)

        fun dealWithScanResult(value: String?)
    }
}